package dao;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import pojo.Manager;

public class ModInfoDao {
	public ModInfoDao(){
		
	}
	/**
	 * 
	 * @param roomNum
	 * @param name
	 * @param tel
	 * @param id
	 */
	public void updateGuest(String roomNum,String name,String tel,String id){
		ConnectDao connectDao = new ConnectDao();
		String sql = "UPDATE guest SET tel= '"+tel+"', guestId = '"+id+"' WHERE name = '"+name+"'AND personId IN (SELECT personId FROM lives WHERE roomNum = '"+roomNum+"')";
		try{
				connectDao.stat.executeUpdate(sql);
				connectDao.closeConnect();
		}catch(SQLException e){
			  	e.printStackTrace();
				connectDao.closeConnect();
			}
	}
}
